package com.wanbangee.marksystem.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.wanbangee.marksystem.entities.StatisticsAverageRanking;
import com.wanbangee.marksystem.entities.StatisticsScoreReport;

/**
 * @author 10391
 *
 */
@Mapper 
public interface StatisticsScoreReportDao {
	
	
	/**查询这场考试所有学生的考试成绩，降序排列1q
	 * @param examId
	 * @return
	 */
	public List<StatisticsScoreReport> selectScoreByExamId(Integer examId); 
	
	
	/**查询这场考试指定班级所有学生的考试成绩，降序排列
	 * @param examId
	 * @param claId
	 * @return
	 */
	public List<StatisticsScoreReport> selectScoreByExamIdClaId(@Param("examId")Integer examId,@Param("claId")Integer claId); 
	
	/**通过姓名或学号查询这场考试指定学生的考试成绩
	 * @param examId
	 * @param claId
	 * @param stuNm
	 * @return
	 */
	public List<StatisticsScoreReport> selectScoreByExamIdClaIdAndStuNmOrStuNo(@Param("examId")Integer examId,@Param("claId")Integer claId,@Param("stuNmOrStuNo")String stuNmOrStuNo);
	

	/**查询个班级名称/人数/总分评分均/班主任/总分最高分/总分最低分
	 * @param examId
	 * @return
	 */
	public List<StatisticsAverageRanking> selectStatisticsAverageRankingByexamId(@Param("examId")Integer examId);
	
	/**查询总平均分/满分/年级/班级数/人数
	 * @param examId
	 * @return
	 */
	public Map selectAvgAndTotalScoreByexamId(Integer examId);
	
	/**
	 * 查询客观题概况
	 * @param examId
	 * @param claId
	 * @param subId
	 * @return
	 */
	public Map<String, Object> selecteObjectiveSituation(@Param("examId")Integer examId,@Param("claId")Integer claId,@Param("subId")Integer subId);
	
	/**
	 * 查询主观题概况
	 * @param examId
	 * @param claId
	 * @param subId
	 * @return
	 */
	public Map<String, Object> selecteSubjectiveSituation(@Param("examId")Integer examId,@Param("claId")Integer claId,@Param("subId")Integer subId);
	
}